package cm.feisi.tools;

import android.app.ActivityManager;
import android.app.ActivityManager.MemoryInfo;
import android.content.Context;
import android.text.format.Formatter;

public class ReadPhoneInfo {
	private MemoryInfo meminfo;
	private String info;
	
	public ReadPhoneInfo(Context context){
		ActivityManager manager = (ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE);
		meminfo = new MemoryInfo();
		manager.getMemoryInfo(meminfo);
		
		info = Formatter.formatFileSize(context, meminfo.availMem);
	}
	
	public String getInfo(){
		return info;
	}
}
